﻿@using DeviceMaintainGIS.Model.DevInfo;
@model DeviceMaintainGIS.Model.DevInfo.DevInfoModel
@{
    Layout = null;
    List<DevTypeModel> DevTypeList = ViewBag.DevTypeList;
    List<DevTabDeviceLevel> DevTabDeviceLevelList = ViewBag.DevTabDeviceLevelList;
}
<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>设备添加</title>
    <link href="~/Scripts/jquery-easyui-1.5.4/themes/bootstrap/easyui.css" rel="stylesheet" />
    <script src="~/Scripts/jquery-easyui-1.5.4/jquery.min.js"></script>
    <script src="~/Scripts/jquery-easyui-1.5.4/jquery.easyui.min.js"></script>
    <script src="~/Scripts/jquery-easyui-1.5.4/locale/easyui-lang-zh_CN.js"></script>
    <link href="~/Content/themes/icon.css" rel="stylesheet" />
    <script src="~/Content/js/common.js"></script>
    <link href="~/Content/themes/table.css" rel="stylesheet" />
</head>
<body>
    <div style="padding: 15px; overflow: hidden">
        <form id="DevEditForm" method="post" action="">
            <table class="tableForm" width="100%">
                @*<tr>
                    <th>
                        设备编号：
                    </th>
                    <td>*@
                <input type="hidden" name="txtID" id="txtID" value="@Model.ID">
                <input type="hidden" name="txtDeviceId" id="txtDeviceId" value="@Model.DeviceId" class="easyui-validatebox textbox" data-options="required:true" style="width:170px;height:22px;" disabled="disabled" />
                @*</td>
                    </tr>*@
                <tr>
                    <th>
                        设备名称：
                    </th>
                    <td>
                        <input type="text" name="txtDeviceName" id="txtDeviceName" value="@Model.DeviceName" class="easyui-validatebox textbox" data-options="required:true" style="width:170px;height:22px;" />
                    </td>
                </tr>
                <tr>
                    <th>
                        设备类别：
                    </th>
                    <td>
                        @*<input type="text" name="txtDeviceTypeId" id="txtDeviceTypeId" value="@Model.DeviceTypeId" class="easyui-validatebox textbox" data-options="required:true" style="width:170px;height:22px;" />*@
                        <select id="txtDeviceTypeId">
                            <option value="0">全部</option>

                            @foreach (DevTypeModel ltm in DevTypeList)
                            {
                                if (ltm.DeviceTypeId == Model.DeviceTypeId)
                                {
                                    <option value="@ltm.DeviceTypeId" selected="selected">@ltm.DeviceName</option>
                                }
                                else
                                {
                                    <option value="@ltm.DeviceTypeId">@ltm.DeviceName</option>
                                }
                            }
                        </select>
                    </td>
                </tr>
                <tr>
                    <th>
                        厂家序列号：
                    </th>
                    <td>
                        <input type="text" name="txtFactorySerial" id="txtFactorySerial" value="@Model.FactorySerial" class="easyui-validatebox textbox" data-options="required:true" style="width:170px;height:22px;" />
                    </td>
                </tr>
                <tr>
                    <th>
                        公司序列号：
                    </th>
                    <td>
                        <input type="text" name="txtCompanySerial" id="txtCompanySerial" value="@Model.CompanySerial" class="easyui-validatebox textbox" data-options="required:true" style="width:150px;height:22px;" />
                    </td>
                </tr>
                <tr>
                    <th>
                        厂家型号规格：
                    </th>
                    <td>
                        <input type="text" name="txtFModelSize" id="txtFModelSize" value="@Model.FModelSize" class="easyui-validatebox textbox" data-options="required:true" style="width:150px;height:22px;" />
                    </td>
                </tr>
                <tr>
                    <th>
                        公司型号规格：
                    </th>
                    <td>
                        <input type="text" name="txtCModelSize" id="txtCModelSize" value="@Model.CModelSize" class="easyui-validatebox textbox" data-options="required:true" style="width:150px;height:22px;" />
                    </td>
                </tr>
                <tr>
                    <th>
                        软件：
                    </th>
                    <td>
                        <input type="text" name="txtSoftware" id="txtSoftware" value="@Model.Software" class="easyui-validatebox textbox" style="width:150px;height:22px;" />
                    </td>
                </tr>
                <tr>
                    <th>
                        软件版本号：
                    </th>
                    <td>
                        <input type="text" name="txtSoftwareVersion" id="txtSoftwareVersion" value="@Model.SoftwareVersion" class="easyui-validatebox textbox" style="width:150px;height:22px;" />
                    </td>
                </tr>
                <tr>
                    <th>
                        采购负责人：
                    </th>
                    <td>
                        <input type="text" name="txtPurchaser" id="txtPurchaser" value="@Model.Purchaser" class="easyui-validatebox textbox" data-options="required:true" style="width:150px;height:22px;" />
                    </td>
                </tr>
                <tr>
                    <th>
                        采购时间：
                    </th>
                    <td>
                        <input type="text" name="txtPurchaseTime" id="txtPurchaseTime" value="@Model.PurchaseTime.ToString("yyyy-MM-dd")" class="easyui-datebox"
                               editable="false" style="width:150px;height:22px;" />
                    </td>
                </tr>
                <tr>
                    <th>
                        质保期：
                    </th>
                    <td>
                        <input type="text" name="txtWarrantyTime" id="txtWarrantyTime" value="@Model.WarrantyTime.ToString("yyyy-MM-dd")" class="easyui-datebox"
                               editable="false" style="width:150px;height:22px;" />
                    </td>
                </tr>
                <tr>
                    <th>
                        设备厂家：
                    </th>
                    <td>
                        <input type="text" name="txtDeviceFactory" id="txtDeviceFactory" value="@Model.DeviceFactory" class="easyui-validatebox textbox" data-options="required:true" style="width:170px;height:22px;" />
                    </td>
                </tr>
                <tr>
                    <th>
                        联系电话：
                    </th>
                    <td>
                        <input type="text" name="txtDeviceTel" id="txtDeviceTel" value="@Model.DeviceTel" class="easyui-validatebox textbox" data-options="required:true" style="width:170px;height:22px;" />
                    </td>
                </tr>

                <tr>
                    <th>
                        维修厂家：
                    </th>
                    <td>
                        <input type="text" name="txtRepairFactory" id="txtRepairFactory" value="@Model.RepairFactory" class="easyui-validatebox textbox" data-options="required:true" style="width:170px;height:22px;" />
                    </td>
                </tr>
                <tr>
                    <th>
                        维修厂家联系人：
                    </th>
                    <td>
                        <input type="text" name="txtRepairFactoryManager" id="txtRepairFactoryManager" value="@Model.RepairFactoryManager" class="easyui-validatebox textbox" data-options="required:true" style="width:170px;height:22px;" />
                    </td>
                </tr>
                <tr>
                    <th>
                        联系电话：
                    </th>
                    <td>
                        <input type="text" name="txtRepairTel" id="txtRepairTel" value="@Model.RepairTel" class="easyui-validatebox textbox" data-options="required:true" style="width:170px;height:22px;" />
                    </td>
                </tr>
                <tr>
                    <th>
                        设备等级：
                    </th>
                    <td>
                        <select id="editselDeviceLevel">
                            @foreach (DevTabDeviceLevel ltm in DevTabDeviceLevelList)
                            {
                                if (ltm.Level == Model.DeviceLevel)
                                {
                                    <option value="@ltm.Level" selected>@ltm.Level</option>
                                }
                                else
                                {
                                    <option value="@ltm.Level">@ltm.Level</option>
                                }

                            }
                        </select>
                    </td>
                </tr>
                <tr>
                    <th>
                        请选择父设备：
                    </th>
                    <td>

                        <input class="easyui-combobox" name="ParentDev" id="ParentDev" data-options="valueField:'id',textField:'text',panelHeight:'auto',panelMaxHeight:200,panelMinHeight:100,onLoadSuccess:function(data){ if('@ViewBag.ParentID'!='-1'){;$('#ParentDev').combobox('setValue','@ViewBag.ParentID');$('#ParentDev').combobox('setText','@ViewBag.DeviceName')}}" style="width: 160px;height: 29px" />
                    </td>
                </tr>

                <tr>
                    <th>
                        备注：
                    </th>
                    <td>

                        <textarea rows="3" cols="50" name="txtRemark" id="txtRemark" class="easyui-validatebox">@Model.Remark</textarea>
                    </td>
                </tr>
            </table>
        </form>
    </div>

</body>
</html>